.class public Lcom/bytedance/sdk/openadsdk/i/e;
.super Ljava/lang/Object;
.source "TTThreadPool.java"


# static fields
.field private static final a:I

.field private static final b:I

.field private static final c:I

.field private static final d:I

.field private static final e:Ljava/util/concurrent/PriorityBlockingQueue;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/concurrent/PriorityBlockingQueue<",
            "Ljava/lang/Runnable;",
            ">;"
        }
    .end annotation
.end field

.field private static final f:Ljava/util/concurrent/PriorityBlockingQueue;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/concurrent/PriorityBlockingQueue<",
            "Ljava/lang/Runnable;",
            ">;"
        }
    .end annotation
.end field

.field private static final g:Ljava/util/concurrent/PriorityBlockingQueue;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/concurrent/PriorityBlockingQueue<",
            "Ljava/lang/Runnable;",
            ">;"
        }
    .end annotation
.end field

.field private static final h:Ljava/util/concurrent/ArrayBlockingQueue;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/concurrent/ArrayBlockingQueue<",
            "Ljava/lang/Runnable;",
            ">;"
        }
    .end annotation
.end field


# direct methods
.method static constructor <clinit>()V
    .locals 3

    .line 1
    invoke-static {}, Ljava/lang/Runtime;->getRuntime()Ljava/lang/Runtime;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/Runtime;->availableProcessors()I

    move-result v0

    sput v0, Lcom/bytedance/sdk/openadsdk/i/e;->a:I

    .line 2
    div-int/lit8 v1, v0, 0x2

    add-int/lit8 v1, v1, 0x1

    const/4 v2, 0x4

    if-ge v1, v2, :cond_0

    const/4 v0, 0x4

    goto :goto_0

    :cond_0
    div-int/lit8 v0, v0, 0x2

    add-int/lit8 v0, v0, 0x1

    :goto_0
    sput v0, Lcom/bytedance/sdk/openadsdk/i/e;->b:I

    .line 3
    sget v0, Lcom/bytedance/sdk/openadsdk/i/e;->a:I

    div-int/lit8 v1, v0, 0x2

    add-int/lit8 v1, v1, 0x1

    if-ge v1, v2, :cond_1

    const/4 v0, 0x4

    goto :goto_1

    :cond_1
    div-int/lit8 v0, v0, 0x2

    add-int/lit8 v0, v0, 0x1

    :goto_1
    sput v0, Lcom/bytedance/sdk/openadsdk/i/e;->c:I

    .line 4
    sget v0, Lcom/bytedance/sdk/openadsdk/i/e;->a:I

    div-int/lit8 v1, v0, 0x2

    add-int/lit8 v1, v1, 0x1

    if-le v1, v2, :cond_2

    const/4 v0, 0x4

    goto :goto_2

    :cond_2
    div-int/lit8 v0, v0, 0x2

    add-int/lit8 v0, v0, 0x1

    :goto_2
    sput v0, Lcom/bytedance/sdk/openadsdk/i/e;->d:I

    .line 5
    new-instance v0, Ljava/util/concurrent/PriorityBlockingQueue;

    invoke-direct {v0}, Ljava/util/concurrent/PriorityBlockingQueue;-><init>()V

    sput-object v0, Lcom/bytedance/sdk/openadsdk/i/e;->e:Ljava/util/concurrent/PriorityBlockingQueue;

    .line 6
    new-instance v0, Ljava/util/concurrent/PriorityBlockingQueue;

    invoke-direct {v0}, Ljava/util/concurrent/PriorityBlockingQueue;-><init>()V

    sput-object v0, Lcom/bytedance/sdk/openadsdk/i/e;->f:Ljava/util/concurrent/PriorityBlockingQueue;

    .line 7
    new-instance v0, Ljava/util/concurrent/PriorityBlockingQueue;

    invoke-direct {v0}, Ljava/util/concurrent/PriorityBlockingQueue;-><init>()V

    sput-object v0, Lcom/bytedance/sdk/openadsdk/i/e;->g:Ljava/util/concurrent/PriorityBlockingQueue;

    .line 8
    new-instance v0, Ljava/util/concurrent/ArrayBlockingQueue;

    invoke-direct {v0, v2}, Ljava/util/concurrent/ArrayBlockingQueue;-><init>(I)V

    sput-object v0, Lcom/bytedance/sdk/openadsdk/i/e;->h:Ljava/util/concurrent/ArrayBlockingQueue;

    return-void
.end method

.method public static a()Ljava/util/concurrent/ThreadPoolExecutor;
    .locals 10

    .line 1
    new-instance v9, Ljava/util/concurrent/ThreadPoolExecutor;

    sget v2, Lcom/bytedance/sdk/openadsdk/i/e;->b:I

    sget-object v5, Ljava/util/concurrent/TimeUnit;->SECONDS:Ljava/util/concurrent/TimeUnit;

    sget-object v6, Lcom/bytedance/sdk/openadsdk/i/e;->e:Ljava/util/concurrent/PriorityBlockingQueue;

    new-instance v7, Lcom/bytedance/sdk/openadsdk/i/d;

    const/4 v0, 0x5

    const-string v1, "tt-api-thread-"

    invoke-direct {v7, v0, v1}, Lcom/bytedance/sdk/openadsdk/i/d;-><init>(ILjava/lang/String;)V

    .line 2
    invoke-static {}, Lcom/bytedance/sdk/openadsdk/i/e;->f()Ljava/util/concurrent/RejectedExecutionHandler;

    move-result-object v8

    const/4 v1, 0x2

    const-wide/16 v3, 0x5

    move-object v0, v9

    invoke-direct/range {v0 .. v8}, Ljava/util/concurrent/ThreadPoolExecutor;-><init>(IIJLjava/util/concurrent/TimeUnit;Ljava/util/concurrent/BlockingQueue;Ljava/util/concurrent/ThreadFactory;Ljava/util/concurrent/RejectedExecutionHandler;)V

    return-object v9
.end method

.method public static b()Ljava/util/concurrent/ThreadPoolExecutor;
    .locals 10

    .line 1
    new-instance v9, Ljava/util/concurrent/ThreadPoolExecutor;

    sget v2, Lcom/bytedance/sdk/openadsdk/i/e;->c:I

    sget-object v5, Ljava/util/concurrent/TimeUnit;->SECONDS:Ljava/util/concurrent/TimeUnit;

    sget-object v6, Lcom/bytedance/sdk/openadsdk/i/e;->f:Ljava/util/concurrent/PriorityBlockingQueue;

    new-instance v7, Lcom/bytedance/sdk/openadsdk/i/d;

    const/4 v0, 0x5

    const-string v1, "tt-background-thread-"

    invoke-direct {v7, v0, v1}, Lcom/bytedance/sdk/openadsdk/i/d;-><init>(ILjava/lang/String;)V

    .line 2
    invoke-static {}, Lcom/bytedance/sdk/openadsdk/i/e;->f()Ljava/util/concurrent/RejectedExecutionHandler;

    move-result-object v8

    const/4 v1, 0x2

    const-wide/16 v3, 0x5

    move-object v0, v9

    invoke-direct/range {v0 .. v8}, Ljava/util/concurrent/ThreadPoolExecutor;-><init>(IIJLjava/util/concurrent/TimeUnit;Ljava/util/concurrent/BlockingQueue;Ljava/util/concurrent/ThreadFactory;Ljava/util/concurrent/RejectedExecutionHandler;)V

    return-object v9
.end method

.method public static c()Ljava/util/concurrent/ScheduledExecutorService;
    .locals 3

    .line 1
    new-instance v0, Lcom/bytedance/sdk/openadsdk/i/d;

    const/4 v1, 0x1

    const-string v2, "tt-delay-thread-"

    invoke-direct {v0, v1, v2}, Lcom/bytedance/sdk/openadsdk/i/d;-><init>(ILjava/lang/String;)V

    invoke-static {v0}, Ljava/util/concurrent/Executors;->newSingleThreadScheduledExecutor(Ljava/util/concurrent/ThreadFactory;)Ljava/util/concurrent/ScheduledExecutorService;

    move-result-object v0

    return-object v0
.end method

.method public static d()Ljava/util/concurrent/ThreadPoolExecutor;
    .locals 10

    .line 1
    new-instance v9, Ljava/util/concurrent/ThreadPoolExecutor;

    sget-object v5, Ljava/util/concurrent/TimeUnit;->SECONDS:Ljava/util/concurrent/TimeUnit;

    sget-object v6, Lcom/bytedance/sdk/openadsdk/i/e;->g:Ljava/util/concurrent/PriorityBlockingQueue;

    new-instance v7, Lcom/bytedance/sdk/openadsdk/i/d;

    const/4 v0, 0x5

    const-string v1, "tt-aidl-thread-"

    invoke-direct {v7, v0, v1}, Lcom/bytedance/sdk/openadsdk/i/d;-><init>(ILjava/lang/String;)V

    .line 2
    invoke-static {}, Lcom/bytedance/sdk/openadsdk/i/e;->f()Ljava/util/concurrent/RejectedExecutionHandler;

    move-result-object v8

    const/4 v1, 0x0

    const/4 v2, 0x2

    const-wide/16 v3, 0x5

    move-object v0, v9

    invoke-direct/range {v0 .. v8}, Ljava/util/concurrent/ThreadPoolExecutor;-><init>(IIJLjava/util/concurrent/TimeUnit;Ljava/util/concurrent/BlockingQueue;Ljava/util/concurrent/ThreadFactory;Ljava/util/concurrent/RejectedExecutionHandler;)V

    return-object v9
.end method

.method public static e()Ljava/util/concurrent/ThreadPoolExecutor;
    .locals 10

    .line 1
    new-instance v9, Ljava/util/concurrent/ThreadPoolExecutor;

    sget-object v5, Ljava/util/concurrent/TimeUnit;->SECONDS:Ljava/util/concurrent/TimeUnit;

    sget-object v6, Lcom/bytedance/sdk/openadsdk/i/e;->h:Ljava/util/concurrent/ArrayBlockingQueue;

    new-instance v7, Lcom/bytedance/sdk/openadsdk/i/d;

    const/4 v0, 0x5

    const-string v1, "tt-file-log-upload-thread-"

    invoke-direct {v7, v0, v1}, Lcom/bytedance/sdk/openadsdk/i/d;-><init>(ILjava/lang/String;)V

    .line 2
    invoke-static {}, Lcom/bytedance/sdk/openadsdk/i/e;->f()Ljava/util/concurrent/RejectedExecutionHandler;

    move-result-object v8

    const/4 v1, 0x2

    const/4 v2, 0x4

    const-wide/16 v3, 0xa

    move-object v0, v9

    invoke-direct/range {v0 .. v8}, Ljava/util/concurrent/ThreadPoolExecutor;-><init>(IIJLjava/util/concurrent/TimeUnit;Ljava/util/concurrent/BlockingQueue;Ljava/util/concurrent/ThreadFactory;Ljava/util/concurrent/RejectedExecutionHandler;)V

    return-object v9
.end method

.method public static f()Ljava/util/concurrent/RejectedExecutionHandler;
    .locals 1

    .line 1
    new-instance v0, Lcom/bytedance/sdk/openadsdk/i/e$1;

    invoke-direct {v0}, Lcom/bytedance/sdk/openadsdk/i/e$1;-><init>()V

    return-object v0
.end method
